from websockets.server import WebSocketServerProtocol


class IWebSocketServer:

    def handshake_handler(self):...

    def on_open(self, conn: 'WebSocketServerProtocol'): ...

    async def on_error(self, conn: 'WebSocketServerProtocol', e: Exception): ...

    async def on_message(self, conn: 'WebSocketServerProtocol', message: bytes): ...

    async def on_close(self, conn: 'WebSocketServerProtocol'): ...

    async def on_start(self): ...
